unit URelatorioTipoOperacao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UrelatorioBase, RLPDFFilter, RLXLSFilter, RLFilters,
  RLHTMLFilter, RLDraftFilter, DB, DBTables, RLReport, StdCtrls, ExtCtrls,
  Buttons;

type
  TFRelatorioTipoOperacao = class(TFrelatorioBase)
    RLBand2: TRLBand;
    RLBand3: TRLBand;
    RLLabel1: TRLLabel;
    RLLabel2: TRLLabel;
    RLDBText2: TRLDBText;
    RLDBText3: TRLDBText;
    RLLabel3: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel7: TRLLabel;
    RLLabel8: TRLLabel;
    RLLabel9: TRLLabel;
    RLBand4: TRLBand;
    RLDBResult1: TRLDBResult;
    RLLabel10: TRLLabel;
    procedure btnPesquisarClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRelatorioTipoOperacao: TFRelatorioTipoOperacao;

implementation

uses TipoVenda;

{$R *.dfm}

procedure TFRelatorioTipoOperacao.btnPesquisarClick(Sender: TObject);
const SQL_PESQUISA =
  ' select '+
  ' tipovenda.tipvend_codigo, '+
  ' tipovenda.tipvend_descricao, '+
  ' tipovenda.tipvend_deb_cred_cofins, '+
  ' tipovenda.tipvend_deb_cred_pis '+
  ' from tipovenda '+
  ' where '+
  ' ((tipovenda.excluido <> ''S'' ) OR (tipovenda.excluido is null)) order by tipvend_descricao';


begin

  QPesquisa.Close;
  QPesquisa.SQL.Clear;
  QPesquisa.SQL.Add(SQL_PESQUISA);
  QPesquisa.Open;

  inherited;

end;

procedure TFRelatorioTipoOperacao.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  FRelatorioTipoOperacao:=nil;
  inherited;
end;

end.
